Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON Schema - include latest spec updates around CredSchema/digestSRI #455

Merged
merged 4 commits into from
Aug 29, 2023

Conversation

decentralgabe
Copy link
Member

  • Add enforcement of credential schema for json schema credentials and associated tests

@codecov-commenter
Copy link

Codecov Report

Merging #455 (0b9d50b) into main (c5f453c) will increase coverage by 0.07%.
The diff coverage is 75.00%.

❗ Current head 0b9d50b differs from pull request most recent head 56929a7. Consider uploading reports for the commit 56929a7 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #455      +/-   ##
==========================================
+ Coverage   57.35%   57.42%   +0.07%     
==========================================
  Files          67       67              
  Lines        7479     7499      +20     
==========================================
+ Hits         4289     4306      +17     
- Misses       2454     2455       +1     
- Partials      736      738       +2     
Files Changed Coverage Δ
credential/model.go 39.13% <ø> (ø)
credential/schema/model.go 65.57% <ø> (ø)
credential/schema/vcjsonschema.go 60.75% <75.00%> (+5.58%) ⬆️

Copy link
Contributor

@andresuribe87 andresuribe87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will also need to validate that a VC that's setting the credentialSchema.digestSRI property, has a value which matches against the locally calculated digestSRI. This typically involves dereferencing credentialSchema.id, and then following the spec of SubResource Integrity.

I would prefer that we do that in this PR, so that the same mechanism is used for every VC (instead of special casing VCs who's type property is JsonSchemaCredential). That said, I'd understand leaving that for another PR. Up to you.

@decentralgabe
Copy link
Member Author

I'd rather take that in a separate PR, but opened an issue #456

@decentralgabe decentralgabe merged commit e745002 into main Aug 29, 2023
5 checks passed
@decentralgabe decentralgabe deleted the update-latest-jsonschema branch August 29, 2023 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants